how to extract character from String